Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Add common library #6495

Conversation

giancarloromeo
Copy link
Contributor

What do these changes do?

The idea is to create a common-library that will contain all the domain-agnostic and reusable components (base classes, validators).

Before, everything was included into models-library.

Related issue/s

How to test

Dev-ops checklist

@giancarloromeo giancarloromeo self-assigned this Oct 7, 2024
@giancarloromeo giancarloromeo added the t:maintenance Some planned maintenance work label Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 81.39535% with 8 lines in your changes missing coverage. Please review.

Please upload report for BASE (pydantic_v2_migration@d2d81c0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...common-library/src/common_library/serialization.py 66.6% 4 Missing and 2 partials ⚠️
...ry/src/common_library/pydantic_fields_extension.py 86.6% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             pydantic_v2_migration   #6495   +/-   ##
=======================================================
  Coverage                         ?   80.7%           
=======================================================
  Files                            ?     211           
  Lines                            ?    8080           
  Branches                         ?     478           
=======================================================
  Hits                             ?    6526           
  Misses                           ?    1495           
  Partials                         ?      59           
Flag Coverage Δ
unittests 80.7% <81.3%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ages/common-library/src/common_library/__init__.py 100.0% <100.0%> (ø)
...ommon-library/src/common_library/errors_classes.py 100.0% <100.0%> (ø)
.../src/common_library/pydantic_networks_extension.py 100.0% <100.0%> (ø)
...y/src/models_library/osparc_variable_identifier.py 100.0% <100.0%> (ø)
...ary/src/models_library/utils/specs_substitution.py 98.1% <100.0%> (ø)
...ry/src/common_library/pydantic_fields_extension.py 86.6% <86.6%> (ø)
...common-library/src/common_library/serialization.py 66.6% <66.6%> (ø)

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Q: What is the advantage of having this library?

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please ask me for a review again when done

@giancarloromeo giancarloromeo marked this pull request as ready for review October 7, 2024 13:24
@giancarloromeo giancarloromeo changed the title ♻️ WIP: Add common library ♻️ Add common library Oct 7, 2024
@giancarloromeo giancarloromeo requested a review from GitHK October 7, 2024 13:26
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned this morning, you will have to add it to all requirements of all services.

As a rule of thumb: wherever in requirements where you use e.g. models-library you need to add this library

image

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, we'll need to add it the the service where we use it.

@giancarloromeo add yourself to the code owners file as well 😃

Copy link

sonarqubecloud bot commented Oct 7, 2024

@giancarloromeo giancarloromeo merged commit 19e3923 into ITISFoundation:pydantic_v2_migration Oct 7, 2024
10 of 38 checks passed
@giancarloromeo giancarloromeo deleted the add-common-library branch October 7, 2024 14:33
@giancarloromeo giancarloromeo added this to the MartinKippenberger milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants